<cfoutput>
	<CFQUERY NAME="getprod" DATASOURCE="#dsn#">
		select *
		from tblproducts
		where prodid = '#prodid#'
	</CFQUERY>
	<cfif getprod.RecordCount GT 0>
		<cflocation url="edit_item.cfm?prodid=#prodid#" addtoken="false">
	<cfelse>
		<CFQUERY  DATASOURCE="#dsn#">
			insert into tblproducts
			(PRODID) values ('#prodid#')
		</CFQUERY>
		<cflocation url="edit_item.cfm?prodid=#prodid#" addtoken="false">
		<cfabort>
	</cfif>
</cfoutput>